import { createRouter, createWebHistory } from 'vue-router'
import Layout from '@/layout/index.vue'

const routes = [
  {
    path: '/',
    component: Layout,
    redirect: '/dashboard',
    children: [
      {
        path: 'dashboard',
        name: 'Dashboard',
        component: () => import('@/views/Dashboard.vue'),
        meta: { title: '首页', icon: 'House' }
      },
      {
        path: 'bank-query',
        name: 'BankQuery',
        component: () => import('@/views/BankQuery.vue'),
        meta: { title: '银行卡查询', icon: 'CreditCard' }
      },
      {
        path: 'mail-send',
        name: 'MailSend',
        component: () => import('@/views/MailSend.vue'),
        meta: { title: '邮件发送', icon: 'Message' }
      }
    ]
  }
]

const router = createRouter({
  history: createWebHistory(),
  routes
})

export default router